home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / spiderweb / src / ada / old.spider < prev    next >
Encoding:
Text File  |  1993-04-04  |  8.0 KB  |  262 lines

  1. # Copyright 1989 by Norman Ramsey, Odyssey Research Associates
  2. # Not to be sold, but may be used freely for any purpose
  3. # For more information, see file COPYRIGHT in the parent directory
  4. language Ada extension ada
  5.  
  6. at_sign @
  7.  
  8. module definition stmt use math
  9.  
  10. comment begin <dash-dash> end newline
  11. macros begin
  12. \def\commentbegin{{\tt -- }}
  13. macros end
  14.  
  15. line begin <dash-dash-"line"> end <"">
  16.  
  17. default translation <*> mathness yes
  18.  
  19. token identifier category math mathness maybe
  20. token number category math mathness yes
  21. token newline category ignore_scrap translation <> mathness maybe 
  22. token pseudo_semi translation <> category semi mathness maybe
  23.  
  24. macros begin
  25. \let\R\relax
  26. macros end
  27.  
  28. # Delimiters
  29. token & category binop translation <"\\amp">
  30. token ( category open 
  31. token ) category close 
  32. token * category binop
  33. token + category unorbinop
  34. token , category binop translation <",\\,"-opt-3>
  35. token - category unorbinop
  36. token . category binop
  37. token / category binop
  38. token : category binop 
  39. token ; category semi translation <";"-space-opt-2> 
  40. token < category binop
  41. token = category binop
  42. token > category binop
  43. token | category binop translation <"\\mid"> 
  44.  
  45. # Compound delimiters
  46.  
  47. token => category arrow translation <"\\AR">
  48. token .. category binop translation <"\\.{..}">
  49. token ** category binop translation <"\\mathbin{**}">
  50. token := category binop translation <"\\mathbin{:=}">
  51. token /= translation <"\\I"> category binop 
  52. token >= translation <"\\G"> category binop 
  53. token <= translation <"\\L"> category binop 
  54. token << translation <"\\LL"> category openlabel 
  55. token >> translation <"\\GG"> category closelabel 
  56. token <> translation <"\\LG"> category math
  57.  
  58. # Hacks no ', and this becomes a binary op
  59. token ' category binop mathness no 
  60.  
  61. token # category math translation <"\\#"> 
  62.  
  63.  
  64.  
  65.  
  66. default mathness maybe translation <*>
  67.  
  68. reserved abort ilk math_like
  69. reserved abs ilk unop_like
  70. reserved accept ilk proc_like
  71. reserved access ilk math_like
  72. reserved all ilk math_like
  73. reserved and ilk and_like
  74. reserved array ilk math_like
  75. reserved at ilk at_like
  76. reserved begin ilk begin_like
  77. reserved body ilk math_like
  78. reserved case ilk case_like
  79. reserved constant ilk math_like
  80. reserved declare ilk decl_like
  81. reserved delay ilk math_like
  82. reserved delta ilk math_like
  83. reserved digits ilk math_like
  84. reserved do ilk is_like
  85. reserved else ilk else_like
  86. reserved elsif ilk elsif_like
  87. reserved end ilk end_like
  88. reserved entry ilk proc_like
  89. reserved exception ilk ex_like
  90. reserved exit ilk math_like
  91. reserved for ilk math_like
  92. reserved function ilk proc_like
  93. reserved generic ilk gen_like
  94. reserved goto ilk math_like
  95. reserved if ilk if_like
  96. reserved in ilk unorbinop_like
  97. reserved is ilk is_like 
  98. reserved limited ilk math_like
  99. reserved loop ilk loop_like
  100. reserved mod ilk binop_like
  101. reserved new ilk separate_like
  102. reserved not ilk unop_like
  103. reserved null ilk math_like
  104. reserved of ilk math_like
  105. reserved or ilk or_like
  106. reserved others ilk math_like
  107. reserved out ilk math_like
  108. reserved package ilk proc_like
  109. reserved pragma ilk math_like
  110. reserved private ilk private_like
  111. reserved procedure ilk proc_like
  112. reserved raise ilk math_like
  113. reserved range ilk math_like
  114. reserved record ilk record_like
  115. reserved rem ilk binop_like
  116. reserved renames ilk math_like
  117. reserved return ilk math_like
  118. reserved reverse ilk math_like
  119. reserved select ilk begin_like
  120. reserved separate ilk separate_like
  121. reserved subtype ilk math_like
  122. reserved task ilk proc_like
  123. reserved terminate ilk math_like
  124. reserved then ilk then_like
  125. reserved type ilk math_like
  126. reserved use ilk math_like
  127. reserved when ilk when_like
  128. reserved while ilk math_like
  129. reserved with ilk with_like
  130. reserved xor ilk binop_like
  131.  
  132. ilk and_like translation <*> category and
  133. ilk at_like translation <*> category at
  134. ilk begin_like translation <*-indent> category beginning
  135. ilk binop_like translation <"\\"-space-*-"\\"-space> category binop
  136. ilk case_like translation <*> category case
  137. ilk decl_like translation <*-indent> category declaration
  138. ilk else_like translation <*> category else
  139. ilk elsif_like translation <*> category elsif
  140. ilk end_like translation <*> category close
  141. ilk ex_like translation <*> category exception
  142. ilk gen_like translation <*-indent> category generic
  143. ilk if_like translation <*> category if
  144. ilk is_like translation <*> category is
  145. ilk loop_like translation <*> category loop
  146. ilk math_like translation <*> category math
  147. ilk or_like translation <*> category or
  148. ilk private_like translation <*> category private
  149. ilk proc_like translation <*> category proc
  150. ilk record_like translation <*> category record
  151. ilk separate_like translation <*> category separate
  152. ilk then_like translation <*> category then
  153. ilk unop_like translation <*-"\\"-space> category unop
  154. ilk unorbinop_like translation <"\\"-space-*-"\\"-space> category resunorbinop
  155. ilk when_like translation <*> category when
  156. ilk with_like translation <*> category with
  157.  
  158.  
  159. # \MC means ``math close'' and sets \MS to ``math set''
  160. macros begin
  161. \def\MC{\ifmmode\global\let\MS$\else\global\let\MS\relax\fi\relax\MS}
  162. \def\LG{\mathord{<}\mathord{>}}
  163. \let\IG=\ignorespaces
  164. macros end
  165.  
  166.  
  167.  
  168. beginning <outdent-force> continuation <outdent-force> ending --> stmt
  169. beginning <outdent-force> ending --> stmt
  170. # beginning <force> (stmt|ignore_scrap) --> beginning
  171. beginning <force> stmt --> beginning
  172.  
  173. case <"\\"-space> math <"\\"-space> is <indent-force> --> beginning
  174.  
  175. close semi --> ending
  176. close <"\\"-space> ? semi --> ending
  177. close <"\\"-space> ? <"\\"-space> ? semi --> ending
  178.  
  179. continuation <force> stmt --> continuation
  180. continuation <outdent-force> continuation --> continuation
  181.  
  182.  
  183. declaration <outdent-force> beginning <outdent-force> continuation <outdent-force> ending --> stmt
  184. declaration <outdent-force> beginning <outdent-force> ending --> stmt
  185. declaration <outdent-force> ending --> stmt
  186. declaration <force> stmt --> declaration
  187.  
  188. else <indent-force> --> continuation
  189. elsif <"\\"-space> math <"\\"-space> then <indent-force> --> continuation
  190.  
  191. exception <indent-force> --> continuation
  192.  
  193. generic <outdent-force> declaration --> declaration
  194. generic <force> stmt --> generic
  195.  
  196. if <"\\"-space> math <"\\"-space> then --> ifthen
  197. ifthen <indent-force> stmt --> beginning
  198. ifthen <indent-force> <"\\"-space> math <"\\"-space> <outdent-force> else --> ifthen
  199. ifthen <indent-force> <"\\"-space> math <"\\"-space> <outdent-force> close <"\\"-space> if --> math
  200. ifthen <indent-force> <"\\"-space> math <"\\"-space> <outdent-force> elsif --> if
  201.  
  202.  
  203. is --> math
  204.  
  205. loop <indent-force> --> beginning
  206.  
  207. math [ <"\\"-space> and <"\\"-space> then <"\\"-space> ] --> math binop
  208. math [ <"\\"-space> and <"\\"-space> ] --> math binop
  209.  
  210. math (binop|unorbinop) math --> math
  211. math <"\\"-space> resunorbinop <"\\"-space>  math --> math
  212. (unorbinop|unop) math --> math
  213. resunorbinop <"\\"-space>  math --> math
  214. # This doesn't apply in Ada:  math unop --> math
  215.  
  216. math arrow --> math
  217. math binop <"\\"-space> exception --> math
  218. math <"\\"-space> is --> math
  219. math <"\\"-space> loop --> loop
  220. math <"\\"-space> math --> math
  221. math [ <"\\"-space> or <"\\"-space> else <"\\"-space> ] --> math binop
  222. math [ <"\\"-space> or <"\\"-space> ] --> math binop
  223. math <"\\"-space> private --> math
  224. math <"\\"-space> separate --> math
  225. math <indent-force> stmt <outdent-force> --> stmt
  226. math terminator --> stmt
  227.  
  228. open close --> math
  229. open math close --> math
  230. open [ math semi ] --> open math
  231.  
  232. <force-backup> openlabel math closelabel <force> --> math
  233.  
  234. or <indent-force> --> continuation
  235.  
  236. private <indent-force> --> beginning
  237.  
  238. proc <"\\"-space> math <"\\"-space> is <"\\"-space> separate --> math
  239. proc <"\\"-space> math <"\\"-space> is <indent-force> --> declaration
  240. proc <"\\"-space> math terminator --> stmt
  241.  
  242. record <"\\"-space> at <"\\"-space> math terminator <indent-force> --> beginning
  243. record <indent-force> --> beginning
  244.  
  245. semi --> terminator
  246.  
  247. stmt <force> stmt --> stmt
  248.  
  249. when <"\\"-space> math arrow <indent-force> --> whengroup
  250. [ when <"\\"-space> math ] terminator --> math terminator
  251. whengroup stmt <outdent-force> ending --> ending
  252. whengroup stmt <outdent-force> whengroup --> whengroup
  253.  
  254. with <"\\"-space> math --> math
  255. with <"\\"-space> proc <"\\"-space> math --> math
  256.  
  257. ? ignore_scrap --> #1
  258.  
  259. macros begin
  260. \let\AR=\Longrightarrow
  261. macros end
  262.